Page({
  goDetail(ev) {
    wx.navigateTo({
      url: '/repair_pkg/pages/detail/index?id=' + ev.mark.id,
    })
  },
  addRepair() {
    wx.navigateTo({
      url: '/repair_pkg/pages/form/index',
    })
  },
  onShow() {
    this.getRepairList()
  },
  // 获取报修列表数据
  async getRepairList() {
    const { code, data } = await wx.http.get('/repair')
    if (code !== 10000) return wx.utils.toast()
    // console.log(data);
    this.setData({
      repairList: data.rows
    })
  }
})
